import { CloseOutlined } from "@ant-design/icons-vue";
import { defineComponent, reactive } from "vue";
import styles from "./failCausePopup.module.less";
export default defineComponent({
  setup(props, { expose }) {
    const state = reactive({
      isShow: false,
      content: ''
    })
    const open = (e: any) => {
      state.isShow = true;
      state.content = e;
    }
    expose({
      open,
    })

    return () => (
      <div class={styles.failCausepopup} v-show={state.isShow}>
        <div class={styles.card}>
          <div class={styles['header-box']}>
            <span class={styles.title}>投保失败原因</span>
            <CloseOutlined class={styles['close-icon']} onClick={() => { state.isShow = false }} />
          </div>
          <div class={styles.content}>
            <span>{state.content}</span>
          </div>
        </div>
      </div>
    )
  }
})